package sigletondemo;
//使用单例模式之饿汉式；
public class Singleton {
    private static Singleton instance=new Singleton();
    private Singleton(){
        //构建私有构造方法；
    }
    public static Singleton getInstance(){
        return instance;
    }

}
